﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using LunwenYun.Infrastructure.Entities.Repository;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Data.Entity.Migrations;
using System.Data.Entity.Infrastructure;

namespace LunwenYun.Infrastructure.Entities
{
    public class Context : DbContext
    {
        public Context()
            :base("name=Context")
        {
           Database.SetInitializer<Context>(null);
        }
        public DbSet<T_User> User { get; set; }
        public DbSet<T_Periodical> Periodical { get; set; }
        public DbSet<T_Article> Article { get; set; }
        public DbSet<T_MessageBoard> MessageBoard { get; set; }
        public DbSet<T_Trade> Trade { get; set; }
        public DbSet<T_TradeHistory> TradeHistory { get; set; }
        public DbSet<T_Purpose> Purpose { get; set; }
        public DbSet<T_Agent> Agent { get; set; }
        public DbSet<T_PaperAgentInfo> PaperAgentInfo { get; set; }
        public DbSet<T_ApplySheet> ApplySheet { get; set; }
        public DbSet<T_PayLog> PayLog { get; set; }
        public DbSet<T_IndustryCS> IndustryCS { get; set; }
        public DbSet<T_Organization> Organization { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();//移除复数表名的契约
        }
    }
}
